﻿// <copyright file="Feature.cs" company="Signal Processing Lab, Wuhan University">
// Copyright (c) 2009-2010 All Right Reserved
// </copyright>
// <author>Xinping Deng</author>
// <email>dentoby@gmail.com</email>
// <date>2010-4</date>
// <summary>This is part of Image.NET project.</summary>

namespace SPLWHU.Core.Vectors
{
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// A feature contains a geometry and the attached attributes such as name, area, and so on.
    /// </summary>
    public class Feature
    {
        /// <summary>
        /// The attached geometry.
        /// </summary>
        private Geometry geometry;

        /// <summary>
        /// The attributes of this feature.
        /// </summary>
        private TagCollection attributes;

        /// <summary>
        /// Initializes a new instance of the <see cref="Feature"/> class.
        /// </summary>
        public Feature()
        { }

        /// <summary>
        /// Initializes a new instance of the <see cref="Feature"/> class by specifying the geometry.
        /// </summary>
        /// <param name="geometry">The geometry.</param>
        public Feature(Geometry geometry)
        {
            this.geometry = geometry;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Feature"/> class by specifying the geometry and attributes.
        /// </summary>
        /// <param name="geometry">The geometry.</param>
        /// <param name="attributes">The attributes.</param>
        public Feature(Geometry geometry, TagCollection attributes)
        {
            this.geometry = geometry;
            this.attributes = attributes;
        }

        /// <summary>
        /// Gets or sets the geometry.
        /// </summary>
        /// <value>The geometry.</value>
        public Geometry Geometry
        {
            get { return this.geometry; }
            set { this.geometry = value; }
        }

        /// <summary>
        /// Gets or sets the attributes.
        /// </summary>
        /// <value>The attributes.</value>
        public TagCollection Attributes
        {
            get { return this.attributes; }
            set { this.attributes = value; }
        }
    }
}
